﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Threading;
namespace CardID
{
    public partial class startControl : UserControl
    {
        public startControl()
        {
            InitializeComponent();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            message.Text = "we request server.Please wait...";
            
            localhost.MakePaymentResponse response =  ServiceClient.sendRequest();
            Thread.Sleep(300);
            if (response != null && response.ack != false)
            {
                this.Visible = false;
                this.Enabled = false;
                Control[] list = this.Parent.Controls.Find("Information", true);
                Control result = null;
                if (list.Length != 0)
                {
                    result = list[0];
                    result.Visible = true;
                    result.Enabled = true;
                } 
            }
            
            
        }
    }
}
